<?xml version="1.0" encoding="UTF-8"?>
<html filename="docs/SAXHelpers/TDefaultHandler2.html">
<body>
<a id="#top"/>
<h1>
	                Class Summary : TDefaultHandler2 </h1> This class extends the SAX2 base handler class to support the
 SAX2 <a href="../SAXExt/ILexicalHandler.html">ILexicalHandler</a>,
 <a href="../SAXExt/IDeclHandler.html">IDeclHandler</a>, and
 <a href="../SAXExt/IEntityResolver2.html">IEntityResolver2</a> extensions.
 Except for overriding the
 original SAX1 <a href="../SAXHelpers/TDefaultHandler.html#resolveEntity">resolveEntity</a>
 method the added handler methods just return.  Subclassers may
 override everything on a method-by-method basis.

 <blockquote>
 <em>This module, both source code and documentation, is in the
 Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
 </blockquote>

 <p> <em>Note:</em> this class might yet learn that the
 <em>IContentHandler.setDocumentLocator()</em> call might be passed a
 <a href="../SAXExt/ILocator2.html">ILocator2</a> object, and that the
 <em>IContentHandler.startElement()</em> call might be passed a
 <a href="../SAXExt/IAttributes2.html">IAttributes2</a> object.</p>

<br/><b>Since : </b> SAX 2.0 (extensions 1.1 alpha)
<h2>
	              Methods
	            </h2>
<div style="padding-left:10px">
<a href="#elementDecl">
	                  procedure
	                 elementDecl(SAXString, SAXString)</a>
<br/>
<a href="#attributeDecl">
	                  procedure
	                 attributeDecl(SAXString, SAXString, SAXString, SAXString, SAXString)</a>
<br/>
<a href="#internalEntityDecl">
	                  procedure
	                 internalEntityDecl(SAXString, SAXString)</a>
<br/>
<a href="#externalEntityDecl">
	                  procedure
	                 externalEntityDecl(SAXString, SAXString, SAXString)</a>
<br/>
<a href="#startDTD">
	                  procedure
	                 startDTD(SAXString, SAXString, SAXString)</a>
<br/>
<a href="#endDTD">
	                  procedure
	                 endDTD()</a>
<br/>
<a href="#startEntity">
	                  procedure
	                 startEntity(SAXString)</a>
<br/>
<a href="#endEntity">
	                  procedure
	                 endEntity(SAXString)</a>
<br/>
<a href="#startCDATA">
	                  procedure
	                 startCDATA()</a>
<br/>
<a href="#endCDATA">
	                  procedure
	                 endCDATA()</a>
<br/>
<a href="#comment">
	                  procedure
	                 comment(SAXString)</a>
<br/>
<a href="#getExternalSubset">
	                  function
	                 getExternalSubset(SAXString, SAXString) : IInputSource</a>
<br/>
<a href="#resolveEntity">
	                  function
	                 resolveEntity(SAXString, SAXString, SAXString, SAXString) : IInputSource</a>
<br/>
<a href="#resolveEntity">
	                  function
	                 resolveEntity(SAXString, SAXString) : IInputSource</a>
<br/>
</div>
<br/>
<hr width="100%"/>
<a name="#elementDecl">
<p>
<b>procedure</b> elementDecl(<b>const</b> name : SAXString; <b>const</b> model : SAXString); </p>
</a> Report an element type declaration.

<br/><b>Parameter : </b> name The element type name.
<br/><b>Parameter : </b> model The content model as a normalized string.
<br/><b>Exception : </b> ESAXException The application may raise an exception.
/
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#attributeDecl">
<p>
<b>procedure</b> attributeDecl(<b>const</b> eName : SAXString; <b>const</b> aName : SAXString; <b>const</b> attrType : SAXString; <b>const</b> mode : SAXString; <b>const</b> value : SAXString); </p>
</a> Report an attribute type declaration.

<br/><b>Parameter : </b> eName The name of the associated element.
<br/><b>Parameter : </b> aName The name of the attribute.
<br/><b>Parameter : </b> attrType A string representing the attribute type.
 <br/><b>Parameter : </b> mode A string representing the attribute defaulting mode
        (&quot;#IMPLIED&quot;, &quot;#REQUIRED&quot;, or &quot;#FIXED&quot;) or '' if
        none of these applies.
<br/><b>Parameter : </b> value A string representing the attribute's default value,
        or '' if there is none.
<br/><b>Exception : </b> ESAXException The application may raise an exception.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#internalEntityDecl">
<p>
<b>procedure</b> internalEntityDecl(<b>const</b> name : SAXString; <b>const</b> value : SAXString); </p>
</a> Report an internal entity declaration.

<br/><b>Parameter : </b> name The name of the entity.  If it is a parameter
        entity, the name will begin with '%'.
<br/><b>Parameter : </b> value The replacement text of the entity.
<br/><b>Exception : </b> ESAXException The application may raise an exception.
<br/><b>See : </b> <a href="../SAXHelpers/TDefaultHandler2.html#externalEntityDecl">TDefaultHandler2.externalEntityDecl</a>
<br/><b>See : </b> <a href="../SAX/IDTDHandler.html#unparsedEntityDecl">IDTDHandler.unparsedEntityDecl</a>
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#externalEntityDecl">
<p>
<b>procedure</b> externalEntityDecl(<b>const</b> name : SAXString; <b>const</b> publicId : SAXString; <b>const</b> systemId : SAXString); </p>
</a> Report a parsed external entity declaration.

<br/><b>Parameter : </b> name The name of the entity.  If it is a parameter
        entity, the name will begin with '%'.
<br/><b>Parameter : </b> publicId The declared public identifier of the entity, or
        an empty string if none was declared.
<br/><b>Parameter : </b> systemId The declared system identifier of the entity.
<br/><b>Exception : </b> ESAXException The application may raise an exception.
<br/><b>See : </b> <a href="../SAXHelpers/TDefaultHandler2.html#internalEntityDecl">TDefaultHandler2.internalEntityDecl</a>
<br/><b>See : </b> <a href="../SAX/IDTDHandler.html#unparsedEntityDecl">IDTDHandler.unparsedEntityDecl</a>
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#startDTD">
<p>
<b>procedure</b> startDTD(<b>const</b> name : SAXString; <b>const</b> publicId : SAXString; <b>const</b> systemId : SAXString); </p>
</a> Report the start of DTD declarations, if any.

<br/><b>Parameter : </b> name The document type name.
<br/><b>Parameter : </b> publicId The declared public identifier for the
        external DTD subset, or an empty string if none was declared.
<br/><b>Parameter : </b> systemId The declared system identifier for the
        external DTD subset, or an empty string if none was declared.
        (Note that this is not resolved against the document
        base URI.)
<br/><b>Exception : </b> ESAXException The application may raise an
            exception.
<br/><b>See : </b> <a href="../SAXHelpers/TDefaultHandler2.html#endDTD">TDefaultHandler2.endDTD</a>
<br/><b>See : </b> <a href="../SAXHelpers/TDefaultHandler2.html#startEntity">TDefaultHandler2.startEntity</a>
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#endDTD">
<p>
<b>procedure</b> endDTD(); </p>
</a> Report the end of DTD declarations.

<br/><b>Exception : </b> ESAXException The application may raise an exception.
<br/><b>See : </b> <a href="../SAXHelpers/TDefaultHandler2.html#startDTD">TDefaultHandler2.startDTD</a>
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#startEntity">
<p>
<b>procedure</b> startEntity(<b>const</b> name : SAXString); </p>
</a> Report the beginning of some internal and external XML entities.

 <ul>
 <li>general entities within attribute values</li>
 <li>parameter entities within declarations</li>
 </ul>

 <p>These will be silently expanded, with no indication of where
 the original entity boundaries were.</p>

 <p>Note also that the boundaries of character references (which
 are not really entities anyway) are not reported.</p>

 <p>All start/endEntity events must be properly nested.</p>

<br/><b>Parameter : </b> name The name of the entity.  If it is a parameter
        entity, the name will begin with '%', and if it is the
        external DTD subset, it will be &quot;[dtd]&quot;.
<br/><b>Exception : </b> SAXException The application may raise an exception.
<br/><b>See : </b> <a href="../SAXHelpers/TDefaultHandler2.html#endEntity">TDefaultHandler2.endEntity</a>
<br/><b>See : </b> <a href="../SAXExt/IDeclHandler.html#internalEntityDecl">IDeclHandler.internalEntityDecl</a>
<br/><b>See : </b> <a href="../SAXExt/IDeclHandler.html#externalEntityDecl">IDeclHandler.externalEntityDecl</a>
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#endEntity">
<p>
<b>procedure</b> endEntity(<b>const</b> name : SAXString); </p>
</a> Report the end of an entity.

<br/><b>Parameter : </b> name The name of the entity that is ending.
<br/><b>Exception : </b> ESAXException The application may raise an exception.
<br/><b>See : </b> <a href="../SAXHelpers/TDefaultHandler2.html#startEntity">TDefaultHandler2.startEntity</a>
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#startCDATA">
<p>
<b>procedure</b> startCDATA(); </p>
</a> Report the start of a CDATA section.

<br/><b>Exception : </b> ESAXException The application may raise an exception.
<br/><b>See : </b> <a href="../SAXHelpers/TDefaultHandler2.html#endCDATA">TDefaultHandler2.endCDATA</a>
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#endCDATA">
<p>
<b>procedure</b> endCDATA(); </p>
</a> Report the end of a CDATA section.

<br/><b>Exception : </b> ESAXException The application may raise an exception.
<br/><b>See : </b> <a href="../SAXHelpers/TDefaultHandler2.html#startCDATA">TDefaultHandler2.startCDATA</a>
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#comment">
<p>
<b>procedure</b> comment(<b>const</b> ch : SAXString); </p>
</a> Report an XML comment anywhere in the document.

<br/><b>Parameter : </b> ch The characters in the comment.
<br/><b>Exception : </b> ESAXException The application may raise an exception.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#getExternalSubset">
<p>
<b>function</b> getExternalSubset(<b>const</b> name : SAXString; <b>const</b> baseURI : SAXString) : IInputSource; </p>
</a> Allows applications to provide an external subset for documents
 that don't explicitly define one.

<br/><b>Parameter : </b> name Identifies the document root element.  This name comes
  from a DOCTYPE declaration (where available) or from the actual
  root element.
<br/><b>Parameter : </b> baseURI The document's base URI, serving as an additional
  hint for selecting the external subset.  This is always an absolute
  URI, unless it is an empty string because the IXMLReader was given an
  IInputSource without one.

<br/><b>Result : </b> An InputSource object describing the new external subset
  to be used by the parser, or nil to indicate that no external
  subset is provided.

<br/><b>Exception : </b> ESAXException Any SAX exception.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#resolveEntity">
<p>
<b>function</b> resolveEntity(<b>const</b> name : SAXString; <b>const</b> publicId : SAXString; <b>const</b> baseURI : SAXString; <b>const</b> systemId : SAXString) : IInputSource; </p>
</a> Tells the parser to resolve the systemId against the baseURI
 and read the entity text from that resulting absolute URI.
 Note that because the older
 <a href="../SAXHelpers/TDefaultHandler.html#resolveEntity">TDefaultHandler.resolveEntity</a>
 method is overridden to call this one, this method may sometimes
 be invoked with null <em>name</em> and <em>baseURI</em>, and
 with the <em>systemId</em> already absolutized.

<br/><b>Parameter : </b> name Identifies the external entity being resolved.
  Either '[dtd]' for the external subset, or a name starting
  with '%' to indicate a parameter entity, or else the name of
  a general entity.
<br/><b>Parameter : </b> publicId The public identifier of the external entity being
  referenced (normalized as required by the XML specification), or
  an empty string if none was supplied.
<br/><b>Parameter : </b> baseURI The URI with respect to which relative systemIDs
  are interpreted.  This is always an absolute URI, unless it is
  nil because the XMLReader was given an IInputSource without one.
  This URI is defined by the XML specification to be the one
  associated with the '&lt;' starting the relevant declaration.
<br/><b>Parameter : </b> systemId The system identifier of the external entity
  being referenced; either a relative or absolute URI.

<br/><b>Result : </b> An IInputSource object describing the new input source to
  be used by the parser.  Returning nil directs the parser to
  resolve the system ID against the base URI and open a connection
  to resulting URI.

<br/><b>Exception : </b> ESAXException Any SAX exception.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#resolveEntity">
<p>
<b>function</b> resolveEntity(<b>const</b> publicId : SAXString; <b>const</b> systemId : SAXString) : IInputSource; </p>
</a> Invokes
 <a href="../SAXExt/IEntityResolver2.html#resolveEntity">IEntityResolver2.resolveEntity</a>
 with empty entity name and base URI.
 You only need to override that method to use this class.
<br/>
<p>
<a href="#top">Top</a>
</p>
</body>
</html>